import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

import Home from 'pages/Home'
import Mine from 'pages/Mine'
import Theatre from 'pages/Theatre'
import Error from 'pages/error'
import Hot from 'pages/movies/hot'
import Coming from 'pages/movies/coming'

const routes=[
   {
     path:'/',
     redirect:'/movie'
   },
    {
        path:'/movie',
        component:Home,
        redirect: '/movie/hot',
        children:[
            {
              path:'hot',
              component:Hot
            },
            {
              path:'coming',
              component:Coming
            }
        ]
    },
    {
        path:'/theatre',
        component:Theatre
    },
    {
        path:'/Mine',
        component:Mine
    },
    {
        path:'/erro',
        component:Error
    },
    {
        path:'**',
        redirect:'/error'
    },

]

const router=new VueRouter({
    mode:"history",
    routes
})
 
export default router